import base from "./base";
import useless from "./useless";
// import workOrder from "./workOrder";
import robot from "./robot";
import sr from "./sr";

let moduleMap = {
    base: base,
    useless: useless,
    // workOrder: workOrder,
    robot: robot,
    sr: sr,
};

let serviceList = [];

let mockModule = process.env.VUE_APP_MOCK_MODULES || "";

mockModule = mockModule ? mockModule.split(",") : [];

if (mockModule.length) {
    mockModule.forEach((moduleName) => {
        serviceList = serviceList.concat(moduleMap[moduleName] || []);
    });
} else {
    for (let item in moduleMap) {
        serviceList = serviceList.concat(moduleMap[item]);
    }
}

export default serviceList;
